package umacis.lwuitcomponent.property.controller;

import java.util.Enumeration;
import java.util.Vector;



import com.sun.lwuit.Component;
import com.sun.lwuit.Image;
import com.sun.lwuit.Label;
import com.sun.lwuit.geom.Dimension;

public class LabelPropertyController extends PropertyController {
	
	public LabelPropertyController(Vector components, Vector parents) {
		name = "Label";
		propertyGetterSetter = new PropertyGetterSetter[9];
		int i = 0;
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setAlignment") {	
			public void set(Component cmp, Parameters parameters) {			((Label)cmp).setAlignment(parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	((Label)cmp).getAlignment()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setEndsWith3Points") {	
			public void set(Component cmp, Parameters parameters) {			((Label)cmp).setEndsWith3Points(parameters.boolean1);	}   
			public Parameters get(Component cmp) {	return new Parameters(	((Label)cmp).isEndsWith3Points()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setGap") {	
			public void set(Component cmp, Parameters parameters) {			((Label)cmp).setGap(parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	((Label)cmp).getGap()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setIcon") {	
			public void set(Component cmp, Parameters parameters) {			((Label)cmp).setIcon((Image)parameters.object);	}   
			public Parameters get(Component cmp) {	return new Parameters(	((Label)cmp).getIcon()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setShiftText") {	
			public void set(Component cmp, Parameters parameters) {			((Label)cmp).setShiftText(parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	((Label)cmp).getShiftText()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setText") {	
			public void set(Component cmp, Parameters parameters) {			((Label)cmp).setText((String)parameters.object);	}   
			public Parameters get(Component cmp) {	return new Parameters(	((Label)cmp).getText()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setTextPosition") {	
			public void set(Component cmp, Parameters parameters) {			((Label)cmp).setTextPosition(parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	((Label)cmp).getTextPosition()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setTickerEnabled") {	
			public void set(Component cmp, Parameters parameters) {			((Label)cmp).setTickerEnabled(parameters.boolean1);	}   
			public Parameters get(Component cmp) {	return new Parameters(	((Label)cmp).isTickerEnabled()						);} };
		propertyGetterSetter[i++] =  new PropertyGetterSetter("setVerticalAlignment") {	
			public void set(Component cmp, Parameters parameters) {			((Label)cmp).setVerticalAlignment(parameters.integer);	}   
			public Parameters get(Component cmp) {	return new Parameters(	((Label)cmp).getVerticalAlignment()						);} };
				set(components, parents);
				
		new ButtonPropertyController(components, parents);
		parents.removeElement(this);
		
	}	

}
